﻿@model tantrinh.Models.SanPham

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
@if (Request.IsAuthenticated && @Session["UserId"] != null)
{
<h1>Quản lý sản phẩm</h1>
<h2>Details</h2>

<fieldset>
    <legend>SanPham</legend>

    <div class="display-label">MaSanPham</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.MaSanPham)
    </div>

    <div class="display-label">TenSanPham</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TenSanPham)
    </div>

    <div class="display-label">GiaSanPham</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.GiaSanPham)
    </div>

    <div class="display-label">AnhDaiDien</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.AnhDaiDien)
    </div>

    <div class="display-label">MoTa</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.MoTa)
    </div>

    <div class="display-label">LuotView</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LuotView)
    </div>

    <div class="display-label">ChiTietDanhMuc</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ChiTietDanhMuc.TenChiTietDanhMuc)
    </div>

    <div class="display-label">NhanHieu</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.NhanHieu.TenNhanHieu)
    </div>

    <div class="display-label">NgayDang</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.NgayDang)
    </div>

    <div class="display-label">TinhTrang</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TinhTrang)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.SanPhamID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
}
else
{
    <p>
        Xin vui lòng đăng nhập</p>
    <script type="text/javascript">
        window.location.href = "http://tantrinhcaraudio.com/admin"
    </script>
}